#ifndef PARSER_PROPERTIES_H_
#define PARSER_PROPERTIES_H_
  
#include <istream>
#include <string>
#include <map>

namespace fermat {
namespace parser {

class Properties {
  public  :
    // load the properties from a file
    int loadProperties(const char* fileName, char delimiter, bool verbose, bool multiline = false);
    // load the properties from an in-core buffer
    int loadProperties(std::istream &ist, char delimiter, bool verbose, bool multiline = false);

    std::string getValue(const std::string& key, const std::string& def = "");
    
    const char* getValue(const std::string& key, const char* def = 0);

    int64_t getValue(const std::string& key, int64_t def = 0);

    double getValue(const std::string& key, double def = 0.0);

    void setValue(const std::string& key, const std::string& value);

    void getList(std::string &outBuf, const std::string& linePrefix);
    Properties();
    Properties(const Properties &p);
    ~Properties();
	
  private :
    //Map that holds the (key,value) pairs
    std::map<std::string, std::string>  _propmap; 

};

}
}
#endif 
